package com.zhentao.model.pojo.user.record;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName charge_invite_record
 */
@TableName(value ="charge_invite_record")
public class ChargeInviteRecord implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 邀请人
     */
    private Long inviteUserId;

    /**
     * 备注
     */
    private String notes;

    /**
     * 被邀请人
     */
    private Long invitedUserId;

    /**
     * 邀请时间
     */
    private Date invitedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    public Long getId() {
        return id;
    }

    /**
     *
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 邀请人
     */
    public Long getInviteUserId() {
        return inviteUserId;
    }

    /**
     * 邀请人
     */
    public void setInviteUserId(Long inviteUserId) {
        this.inviteUserId = inviteUserId;
    }

    /**
     * 备注
     */
    public String getNotes() {
        return notes;
    }

    /**
     * 备注
     */
    public void setNotes(String notes) {
        this.notes = notes;
    }

    /**
     * 被邀请人
     */
    public Long getInvitedUserId() {
        return invitedUserId;
    }

    /**
     * 被邀请人
     */
    public void setInvitedUserId(Long invitedUserId) {
        this.invitedUserId = invitedUserId;
    }

    /**
     * 邀请时间
     */
    public Date getInvitedTime() {
        return invitedTime;
    }

    /**
     * 邀请时间
     */
    public void setInvitedTime(Date invitedTime) {
        this.invitedTime = invitedTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ChargeInviteRecord other = (ChargeInviteRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getInviteUserId() == null ? other.getInviteUserId() == null : this.getInviteUserId().equals(other.getInviteUserId()))
            && (this.getNotes() == null ? other.getNotes() == null : this.getNotes().equals(other.getNotes()))
            && (this.getInvitedUserId() == null ? other.getInvitedUserId() == null : this.getInvitedUserId().equals(other.getInvitedUserId()))
            && (this.getInvitedTime() == null ? other.getInvitedTime() == null : this.getInvitedTime().equals(other.getInvitedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getInviteUserId() == null) ? 0 : getInviteUserId().hashCode());
        result = prime * result + ((getNotes() == null) ? 0 : getNotes().hashCode());
        result = prime * result + ((getInvitedUserId() == null) ? 0 : getInvitedUserId().hashCode());
        result = prime * result + ((getInvitedTime() == null) ? 0 : getInvitedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", inviteUserId=").append(inviteUserId);
        sb.append(", notes=").append(notes);
        sb.append(", invitedUserId=").append(invitedUserId);
        sb.append(", invitedTime=").append(invitedTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
